package com.flyduck.vueshop.product.fallback;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.product.feign.RemoteProductFeignClient;
import com.flyduck.vueshop.product.vo.RemoteProductRespVO;
import com.flyduck.vueshop.product.vo.RemoteProductUpdateReqVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: vueshop-cloud
 * @description:
 * @author: flyduck
 * @create: 2024-07-15 21:16
 **/
@Slf4j
@Component
public class RemoteProductFallback implements RemoteProductFeignClient {
    @Override
    public Result<RemoteProductRespVO> getProductById(Long id) {
        log.error("获取商品失败");
        return Result.success(null);
    }

    @Override
    public Result<List<RemoteProductRespVO>> getOnSaleProductList() {
        log.error("获取商品失败");
        return Result.success(new ArrayList<>());
    }

    @Override
    public Result<Void> batchUpdateProduct(List<RemoteProductUpdateReqVO> remoteProductUpdateReqVOList) {
        log.error("批量更新商品失败");
        return Result.success();
    }
}
